<?php
header ( "Content-Type: text/html; charset=utf-8" );
function HttpVisit($ip, $host, $url) {
	$errstr = '';
	$errno = '';
	$fp = fsockopen ( $ip, 80, $errno, $errstr, 90 );
	if (! $fp) {
		return false;
	} else {
		$out = "GET {$url} HTTP/1.1\r\n";
		$out .= "Host:{$host}\r\n";
		$out .= "Connection: close\r\n\r\n";
		fputs ( $fp, $out );
		while ( $line = fread ( $fp, 4096 ) ) {
			$response .= $line;
		}
		fclose ( $fp );
		//去掉Header头信息
		$pos = strpos ( $response, "\r\n\r\n" );
		$response = substr ( $response, $pos + 4 );
		return $response;
	}
}
$ip = gethostbyname ( 'www.belmeng.com' );
echo $ip;
echo file_get_contents ( "http://www.baidu.com" ); //要加http
$sql = "world";
echo "hello $sql";
echo "第" . date ( 'W' ) . "周";
?>